-
Notifications
You must be signed in to change notification settings - Fork 507
WWSTCERT-7864 Add shelly wave motion driver #2381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
drivers/SmartThings/zwave-sensor/profiles/shelly-wave-motion.yml
Outdated
Show resolved
Hide resolved
local function notification_report_handler(self, device, cmd) | ||
local event | ||
if cmd.args.notification_type == Notification.notification_type.HOME_SECURITY then | ||
if cmd.args.event == Notification.event.home_security.STATE_IDLE then | ||
device:emit_event(capabilities.motionSensor.motion.inactive()) | ||
elseif cmd.args.event == Notification.event.home_security.MOTION_DETECTION then | ||
event = capabilities.motionSensor.motion.active() | ||
end | ||
end | ||
|
||
if event ~= nil then | ||
device:emit_event(event) | ||
end | ||
end | ||
|
||
local function sensor_multilevel_report_handler(self, device, cmd) | ||
if cmd.args.sensor_type == SensorMultilevel.sensor_type.LUMINANCE then | ||
device:emit_event(capabilities.illuminanceMeasurement.illuminance({value = cmd.args.sensor_value, unit = "lux"})) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe all of these are covered by our defaults and shouldn't have required any code changes, but you could use a test to verify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and fixed in 4541c11
Co-authored-by: Steven Green <[email protected]>
Duplicate profile check: Passed - no duplicate profiles detected. |
Channel deleted. |
Test Results 70 files 451 suites 0s ⏱️ Results for commit d9d911c. ♻️ This comment has been updated with latest results. |
Minimum allowed coverage is Generated by 🐒 cobertura-action against d9d911c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file no longer does anything and should be removed
lazy_load_if_possible("wakeup-no-poll"), | ||
lazy_load_if_possible("apiv6_bugfix") | ||
lazy_load_if_possible("apiv6_bugfix"), | ||
lazy_load_if_possible("shelly-wave-motion") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the file referenced here does not exist
Check all that apply
Type of Change
Checklist
Description of Change
Summary of Completed Tests